package src.SHIYAN1;//-------------------------------------------------------------
//  While.java    Author:YanYuJun
//
//---------------------------------------------------------------
  import java.util.Scanner;

public class 计算n的阶乘
 {
     private 计算n的阶乘() {
     }

     public static void main(String[]args)
    {
       int n=1,n1;
       Scanner scan=new Scanner(System.in);
      System.out.println("Enter n:");
       n1= scan.nextInt();
       int n2 =1;
       int n3 =1;
       while(n2 <=n1)
          {
           n3 *= n2*n1;
           n1--;
          }
       System.out.println(" n!:" +n3);
     }

     public static Object create计算n的阶乘() {
         return new 计算n的阶乘();
     }
 }
